home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 May / macformat-050.iso / Shareware Plus / Developers / Find_icon folder / Headers / Get1IconSuite.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-25  |  1.8 KB  |  51 lines  |  [TEXT/CWIE]

  1. /*    ---------------------------------------------------------------------------------------------
  2.     Find_icon, code for constructing icon suites for files and folders
  3.     
  4.     by James W. Walker
  5.     preferred e-mail: <mailto:jwwalker@kagi.com>
  6.     alternate e-mail: <mailto:jwwalker@aol.com>, <jim@nisus-soft.com>
  7.     web: <http://users.aol.com/jwwalker/>
  8.     
  9.     File: Get1IconSuite.h
  10.     
  11.     Copyright ©1997 by James W. Walker
  12.     
  13.     You may incorporate this sample code into your applications without
  14.     restriction, though the sample code has been provided "AS IS" and the
  15.     responsibility for its operation is 100% yours.
  16.     If you're going to re-distribute the source, please make it clear
  17.     that the code was descended from James W. Walker's code,
  18.     but that you've made changes.
  19.     ---------------------------------------------------------------------------------------------
  20. */
  21.  
  22. #ifndef __TYPES__
  23.     #include <Types.h>
  24. #endif
  25.  
  26. #ifndef __ICONS__
  27.     #include <Icons.h>
  28. #endif
  29.  
  30. pascal OSErr Get1IconSuite(
  31. /* <-- */    Handle *theSuite,
  32. /* --> */    short theID,
  33. /* --> */    IconSelectorValue theSelector
  34. );
  35. /*    ¶ Similar to the toolbox routine GetIconSuite, except that it looks in
  36.     only the current resource file, not the whole resource chain.
  37.     In case you're wondering why it would be necessary to ensure that
  38.     icons come from only one file, suppose you're looking at a
  39.     file that has its custom icon bit set, but for some reason does
  40.     not contain a custom icon, or at least not a full family.
  41.     Way down the resource chain, there may be another file, say a
  42.     font file, that does have a full family of custom icons. 
  43.     So you get an unexpected icon.
  44.     
  45.     The icons in the resulting suite are resource handles.
  46.  
  47.     theSuite    output:        The new icon suite.
  48.     theID        input:        the resource ID of the icons to fetch.
  49.     theSelector    input:        an icon selector mask, as defined in <Icons.h>.
  50. */
  51.